package pers.youqu.common.exception;

import lombok.Getter;

/**
 * @author Jason
 * @version 1.0.0
 * @date 2020/12/3 21:26
 * @Description 优趣商城自定义异常
 */
@Getter
public class YqException extends RuntimeException {
    /**
     * 异常状态码信息
     */
    private int status;

    /**
     *
     * @param status 状态码
     */
    public YqException(int status) {
        this.status = status;
    }

    /**
     *
     * @param status 状态码
     * @param message 信息
     */
    public YqException(int status, String message) {
        super(message);
        this.status = status;
    }

    /**
     *
     * @param status 状态码
     * @param message 信息
     * @param cause 起始异常
     */
    public YqException(int status, String message, Throwable cause) {
        super(message, cause);
        this.status = status;
    }

    /**
     *
     * @param status 状态码
     * @param cause 起始异常
     */
    public YqException(int status, Throwable cause) {
        super(cause);
        this.status = status;
    }
}
